JavaScript

buttonList.appendButtons Method

Syntax

buttonListObj.appendButtons(buttons)

Arguments

buttonsJSON array

An array of JSON objects that define the buttons to add. The object defining the button has the following properties:

valueany

The value of the button.

hideboolean

If true then the button will not appear in the list. The default is false.

disabledboolean

If true then the button will not appear in the list. The default is false.

htmlstring

The HTML to put in the button.

iconstring

The icon to put in the button. See A5.u.icon.

hoverIconstring

The icon to put in the button when the user hovers over it. See A5.u.icon.

pressedIconstring

The icon to put in the button when it is pressed. See A5.u.icon.

disabledIconstring

The icon to put in the button when it is disabled. See A5.u.icon.

disabledSelectedIconstring

The icon to put in the button when it is disabled and selected. See A5.u.icon.

tipstring

The TITLE attribute to put in the button that will appear as a tool tip when the user hovers over the button.

Description

Appends new buttons to a Button List Control.

Discussion

The appendButtons() method adds one or more buttons to a Button List Control. The buttons are defined as entries in a JSON array.

Example

var buttonListObj = {dialog.object}.getControl('BUTTONLIST_1');

if (buttonListObj) {
    var _new = [
        {html: 'New Button 1', value: 'nb1', tip: 'Help for new button 1'},
        {html: 'New Button 2', value: 'nb2', tip: 'Help for new button 2'},
    ];

    buttonListObj.appendButtons(_new);
}